function HUDHide( myhud )
	for k, v in pairs{"CHudHealth","CHudBattery","CHudAmmo"} do
		if myhud == v then return false end
	end
end
hook.Add("HUDShouldDraw","HUDHide",HUDHide)
surface.CreateFont("SBFont", {
    font = "Arial",
	size = 70,
	weight = 100,
	antialias = true,
	} )
	surface.CreateFont("SBFont2", {
    font = "Arial",
	size = 40,
	weight = 100,
	antialias = true,
	} )
	surface.CreateFont("SBFontsmall", {
    font = "Arial",
	size = 25,
	weight = 100,
	antialias = true,
	} )
	surface.CreateFont("SBFontsmaller", {
    font = "Arial",
	size = 20,
	weight = 100,
	antialias = true,
	} )
function GM:HUDPaint()
	self.BaseClass:HUDPaint()
	local ply = LocalPlayer()
	local Hteam = ply:Team()
	local HP = ply:Health()

	surface.SetTextColor( 20, 180, 50, 255)
	surface.SetFont("SBFont")
	surface.SetTextPos( 20, ScrH() - 100)
	surface.DrawText( "HP".. HP )

	surface.SetTextPos( 10, 10)
	surface.SetFont("SBFont2")
	if Hteam == 1 then
		surface.SetTextColor( 180, 0, 0, 255)
		surface.DrawText( "Team 1" )
	else
		surface.SetTextColor( 0, 180, 0, 255)
		surface.DrawText( "Team 2" )	
	end
end
function HUDStat()
	local ants = ents.FindByClass("npc_*")
	local totalants = table.Count( ants )
	totalants = totalants - 2
	draw.RoundedBox( 8, ScrW() - 220, 1, 210, 60, Color(0, 0, 0, 220) );
	surface.SetFont("SBFontsmall")
	surface.SetTextPos( ScrW() - 200, 25 )
	surface.SetTextColor( 255, 255, 255, 255)
	surface.DrawText("NPC's: ".. totalants )
	surface.SetTextPos( ScrW() - 200, ScrH() / 210 )	
	surface.DrawText("Current wave: ".. currentWave )	
end

function HUDBase()
	local hp1 = 0
	local maxHP1 = 0
	local hp2 = 0
	local maxHP2 = 0
	local base = ents.FindByClass("npc_antlionguard")
	for k, ent in pairs(base) do
		if ent:GetClass() == "npc_antlionguard" then
		local aiteam = ent:GetNWInt("aiteam")
		if aiteam == 1 then 
			hp1 = ent:Health( )
			maxHP1 = 300
		elseif aiteam == 2 then
			hp2 = ent:Health( )
			maxHP2 = 300
		end
		end
	end
	draw.RoundedBox( 8, ScrW() * .5 - 205 , 1, 410, 60, Color(0, 0, 0, 200) );
	surface.SetTextPos( ScrW() * .5 - 40, 3 )
	surface.SetFont("SBFontsmaller")
	surface.DrawText("Base Health")
	surface.SetTextPos( ScrW() * .5 - 190, 19 )
	surface.DrawText("Team 1 -")
	surface.SetTextPos( ScrW() * .5 - 190, 39 )
	surface.DrawText("Team 2 -")
	draw.RoundedBox( 2, ScrW() * .5 - 115 , 23, 300, 10, Color(0, 0, 0, 200) );
	draw.RoundedBox( 2, ScrW() * .5 - 115 , 43, 300, 10, Color(0, 0, 0, 200) );
	draw.RoundedBox( 2, ScrW() * .5 - 115 , 23, math.Remap( hp1, 0, maxHP1, 0, 180 ) , 10, Color(255, 0, 0, 200) );
	draw.RoundedBox( 2, ScrW() * .5 - 115 , 43, math.Remap( hp2, 0, maxHP2, 0, 180 ) , 10, Color(0, 255, 0, 200) );
end

hook.Add("HUDPaint", "BaseHP", HUDBase);
hook.Add("HUDPaint", "GameStats", HUDStat);